#ifndef FKAPPLICATIONMANAGER_H
#define FKAPPLICATIONMANAGER_H

#include <QCoreApplication>
#include <QStringList>

class QProcess;

class FKApplicationManager : public QCoreApplication{
    Q_OBJECT
public:
    FKApplicationManager(int argc, char** argv, QString app);
    ~FKApplicationManager();
private slots:
    void getCommand();
    void processCommands(int exitCode);
    void processCommand(QString command);
private:
    bool backUpAndCopy(QString initialFile, QString targetDirectory, QString backUpDirectory);
    void error(QString description);
    void start();
//fields:
    QString _app;
    QStringList _commands;
    QProcess* _process;
    bool _restart;
    QStringList _avaliableCommands;
    QString _cache;
//    qint32 _caching;
};

#endif // FKAPPLICATIONMANAGER_H
